#ifndef BUTTONLAMP_H
#define BUTTONLAMP_H
#include <QtGui>
#include "buttonrelay.h"

class ButtonLamp : public QGraphicsWidget
{
    Q_OBJECT
public:
    ButtonLamp(int index, QGraphicsItem *parent, int lampradius);
    QRectF boundingRect() const
    {
        return QRectF(-mLampRadius, -mLampRadius, mLampRadius*2, mLampRadius*2);
    }

    QPainterPath shape() const
    {
        QPainterPath path;
        path.addEllipse(boundingRect());
        return path;
    }

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *);
    void setStatus(int status);
    int getIndex();

private:
    int mIndex;
    int mStatus;
    int mLampRadius;
};

#endif // BUTTONLAMP_H
